' Tile the PictureBox with the image in the image control.
Private Sub TilePicture(ByVal pic As PictureBox, ByVal tile_image As Image, ByVal mask_image As Image, ByVal cdx As Integer, ByVal rdx As Integer, ByVal rdy As Integer)
Dim wid As Single
Dim hgt As Single
Dim x As Integer
Dim y As Integer
Dim x1 As Integer
Dim x2 As Integer
Dim startx As Integer
pic.Cls ' Clear the picture box.
' Start above and to the left of the drawing area.